package com.gzq.factorymethod.practice0.simplefactory;

import java.lang.reflect.InvocationTargetException;

import com.gzq.factorymethod.practice0.Human;

public class StaticBaGuaLu {
	public static <T extends Human> T createHuman(Class<T> c) {
		T human = null;
		try {
			human = c.getConstructor().newInstance();
		} catch (InstantiationException | IllegalAccessException
				| IllegalArgumentException | InvocationTargetException
				| NoSuchMethodException | SecurityException e) {
			e.printStackTrace();
		}
		return human;
	}
}
